package lanqiaobei;

import java.util.Scanner;

public class zifutonji {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		char[] chs = scanner.nextLine().toCharArray();
		int[] counts = new int[26];
		for (int i = 0; i < chs.length; i++) {
			counts[chs[i] - 'A'] += 1;
		}
		int max = counts[0];
		String result = "";
		for (int i = 0; i < counts.length; i++) {
			if (counts[i] > max) {
				max = counts[i];
				result = "" + (char) (i + 'A');
			} else if (counts[i] == max) {
				result += (char) (i + 'A');
			}
		}
		System.out.println(result);
	}
}
